package com.itheima.day01.Demo05;
/*测试类*/
public class PersonDemo {
    public static void main(String[] args) {
        //无参构造方法赋值
        Student s=new Student();
        s.setName("小明");
        s.setAge(18);
        System.out.println(s.getName()+","+s.getAge());
        s.study();

        //有参构造方法赋值
        Student s1=new Student("小黄",20);
        System.out.println(s1.getName()+","+s1.getAge());
        s1.study();
    }
}
